package com.demo.thread;

import com.demo.tf.TheFourth;

public class NetThread extends Thread{
	private TheFourth tf;
	public boolean running = false;
	public int netStatus = 0;
	public NetThread(TheFourth tf){
		this.tf = tf;
		running = true;
	}
	
	public void run(){
		while(running){
			tf.netStatus = this.netStatus;
			if(netStatus == 0 && tf.lInfo.getLongitude() != 0.0){
				while(!tf.tagGet.doGet()){
					try{
						Thread.sleep(10000);
					}
					catch(Exception e){
						e.printStackTrace();
					}
				}
				netStatus = -1;
			}
			try{
				Thread.sleep(500);
			}
			catch(Exception e){
				e.printStackTrace();
			}
		}
	}
}
